import http from "../index";
import {getStoreOpenId, OpenId} from "../../utils/storage";

// 用户早餐列表
export function GetFoodOrders(params) {
  return http({
    url: '/Room/GetShoppingCartList',
    method: 'get',
    params: {
      ...params,
      [OpenId]: getStoreOpenId(),
    }
  })
}


// 供选早餐列表
export function GetFoodCates() {
  return http({
    url: '/Room/GetOrderList',
    method: 'get',
  })
}

// 提交早餐订单
export function SubmitFood(data) {
  return http({
    url: '/Room/ADDShoppingCart',
    method: 'post',
    params: {
      ...data,
      [OpenId]: getStoreOpenId(),
    }
  })
}
